package org.example.fancystudy.objecthead;

import org.openjdk.jol.info.ClassLayout;
import org.openjdk.jol.vm.VM;

/**
 * @author chaigq
 * @version 1.0
 * @date 2023/2/22 14:39
 */
class Customer{
    int id;
    boolean flag = false;
}
public class JOLDemo {
    public static void main(String[] args) {
        // 当前虚拟机的信息
        //System.out.println(VM.current().details());
        // 所有对象分配的字节都是8的整数倍
        //System.out.println(VM.current().objectAlignment());
        Object o = new Object();
        System.out.println(ClassLayout.parseInstance(o).toPrintable());
    }
}
